﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GRWL.BZSC.DataLinq;

namespace GRWL.BZSC.Common
{
    /// <summary>
    /// 接口自定义数据类型
    /// </summary>
    public class CustomerData
    {
        /// <summary>
        /// 带关联数据的物料
        /// </summary>
        public class XMaterial
        {
            #region Material成员
            public int Id { get; set; }

            public string Code { get; set; }

            public string CnName { get; set; }

            public string EnName { get; set; }

            public int? Category { get; set; }

            public string Unit { get; set; }

            public string Specs { get; set; }

            public int? Provider { get; set; }

            public int? Depot { get; set; }

            public int? Workstage { get; set; }

            public string ProjectNo { get; set; }

            public string Source { get; set; }

            public int? Department { get; set; }

            public DateTime? Expire { get; set; }

            public string Brand { get; set; }

            public bool IsNominal { get; set; }

            public bool UpdateNominal { get; set; }

            public bool IsCheck { get; set; }

            public int? WaitingDepot { get; set; }

            public int? BadDepot { get; set; }

            public int? ScrapDepot { get; set; }

            public string CheckMethod { get; set; }

            public decimal? PurchasePrice { get; set; }

            public decimal? SalePrice { get; set; }

            public string BatchNo { get; set; }

            public bool Unusable { get; set; }

            public DateTime? CreateTime { get; set; }

            public DateTime? UpdateTime { get; set; }

            public bool DeleteFlag { get; set; }

            public string Memo { get; set; }

            #endregion

            public string CategoryCode { get; set; }
            public string CategoryName { get; set; }
            public string TraderName { get; set; }
            public string DepotCode { get; set; }
            public string DepotName { get; set; }
            public string WaitingDepotCode { get; set; }
            public string WaitingDepotName { get; set; }
            public string BadDepotCode { get; set; }
            public string BadDepotName { get; set; }
            public string ScrapDepotCode { get; set; }
            public string ScrapDepotName { get; set; }

            public string DepartmentCode { get; set; }
            public string DepartmentName { get; set; }
        }

        /// <summary>
        /// 查询物料返回类型
        /// </summary>
        public class QMaterial
        {
            /// <summary>
            /// 系统编号
            /// </summary>
            public int Id { get; set; }
            /// <summary>
            /// 代号
            /// </summary>
            public string Code { get; set; }
            /// <summary>
            /// 名称
            /// </summary>
            public string CnName { get; set; }
            /// <summary>
            /// 规格
            /// </summary>
            public string Specs { get; set; }
            /// <summary>
            /// 主仓库编号
            /// </summary>
            public int? DepotId { get; set; }
            /// <summary>
            /// 主仓库代号
            /// </summary>
            public string DepotCode { get; set; }
            /// <summary>
            /// 主仓库名称
            /// </summary>
            public string DepotName { get; set; }
            /// <summary>
            /// 有效期
            /// </summary>
            public DateTime? Expire { get; set; }
            /// <summary>
            /// 部门Id
            /// </summary>
            public int? DepartmentId { get; set; }
            /// <summary>
            /// 部门代号
            /// </summary>
            public string DepartmentCode { get; set; }
            /// <summary>
            /// 部门名称
            /// </summary>
            public string DepartmentName { get; set; }
            /// <summary>
            /// 品牌
            /// </summary>
            public string Brand { get; set; }
            /// <summary>
            /// 是否停用
            /// </summary>
            public bool Unusable { get; set; }
            /// <summary>
            /// 单位
            /// </summary>
            public string Unit { get; set; }
            /// <summary>
            /// 主供应商Id
            /// </summary>
            public int? ProviderId { get; set; }
            /// <summary>
            /// 主供应商代号
            /// </summary>
            public string ProviderCode { get; set; }
            /// <summary>
            /// 主供应商名称
            /// </summary>
            public string ProviderName { get; set; }
            /// <summary>
            /// 来源
            /// </summary>
            public string Source { get; set; }
        }

        /// <summary>
        /// 带关联数据的收发货单据
        /// </summary>
        public class XShipping
        {
            #region 收发货单实体属性
            public int _id { get; set; }

            public string _code { get; set; }

            public string _type { get; set; }

            public System.Nullable<System.DateTime> _shippingDate { get; set; }

            public System.Nullable<int> _operator { get; set; }

            public System.Nullable<System.DateTime> _createTime { get; set; }

            public System.Nullable<int> _mender { get; set; }

            public System.Nullable<System.DateTime> _updateTime { get; set; }

            public System.Nullable<int> _assessor { get; set; }

            public System.Nullable<System.DateTime> _verifyTime { get; set; }

            public string _status { get; set; }

            public System.Nullable<int> _trader { get; set; }

            public bool _isClosed { get; set; }

            public System.Nullable<int> _department { get; set; }

            public System.Nullable<int> _businessman { get; set; }

            public string _memo { get; set; }

            public string _currency { get; set; }

            public System.Nullable<decimal> _exchangeRate { get; set; }

            public System.Nullable<decimal> _amount { get; set; }

            public string _linkman { get; set; }

            public string _linkTel { get; set; }

            public string _address { get; set; }

            public bool _deleteFlag { get; set; }

            public bool _isCheck { get; set; }
            #endregion

            #region 其他关联属性

            /// <summary>
            /// 制单人代号
            /// </summary>
            public string OperatorCode { get; set; }
            /// <summary>
            /// 制单人名称
            /// </summary>
            public string OperatorName { get; set; }
            /// <summary>
            /// 审批人代号
            /// </summary>
            public string AccessorCode { get; set; }
            /// <summary>
            /// 审批人名称
            /// </summary>
            public string AccessorName { get; set; }
            /// <summary>
            /// 往来单位代号
            /// </summary>
            public string TraderCode { get; set; }
            /// <summary>
            /// 往来单位名称
            /// </summary>
            public string TraderName { get; set; }
            /// <summary>
            /// 部门代号
            /// </summary>
            public string DepartmentCode { get; set; }
            /// <summary>
            /// 部门名称
            /// </summary>
            public string DepartmentName { get; set; }
            /// <summary>
            /// 业务人员代号
            /// </summary>
            public string BusinessCode { get; set; }
            /// <summary>
            /// 业务人员名称
            /// </summary>
            public string BusinessName { get; set; }
            /// <summary>
            /// 修改人代号
            /// </summary>
            public string menderCode { get; set; }
            /// <summary>
            /// 修改人名称
            /// </summary>
            public string menderName { get; set; }
            #endregion
        }

        /// <summary>
        /// 查询收发货单据时返回的数据类型
        /// </summary>
        public class QShipping
        {
            /// <summary>
            /// 收发货单系统编号
            /// </summary>
            public int Id { get; set; }
            /// <summary>
            /// 收发货单代号
            /// </summary>
            public string Code { get; set; }
            /// <summary>
            /// 订单系统编号
            /// </summary>
            public int? OrderId { get; set; }
            /// <summary>
            /// 订单代号
            /// </summary>
            public string OrderCode { get; set; }
            /// <summary>
            /// 收发货日期
            /// </summary>
            public DateTime? ShippingDate { get; set; }
            /// <summary>
            /// 往来单位系统编码
            /// </summary>
            public int? Trader { get; set; }
            /// <summary>
            /// 往来单位代号
            /// </summary>
            public string TraderCode { get; set; }
            /// <summary>
            /// 往来单位名称
            /// </summary>
            public string TraderName { get; set; }
            /// <summary>
            /// 物料系统编号
            /// </summary>
            public int MaterialId { get; set; }
            /// <summary>
            /// 物料代号
            /// </summary>
            public string MaterialCode { get; set; }
            /// <summary>
            /// 物料名称
            /// </summary>
            public string MaterialName { get; set; }
            /// <summary>
            /// 物料规格
            /// </summary>
            public string MaterialSpecs { get; set; }
            /// <summary>
            /// 收发货数量
            /// </summary>
            public int? ShippingNum { get; set; }
            /// <summary>
            /// 收发货地址
            /// </summary>
            public string Address { get; set; }
            /// <summary>
            /// 制单人系统编号
            /// </summary>
            public int? OperatorId { get; set; }
            /// <summary>
            /// 制单人名称
            /// </summary>
            public string OperatorName { get; set; }
            /// <summary>
            /// 批准人系统编号
            /// </summary>
            public int? AccessorId { get; set; }
            /// <summary>
            /// 批准人名称
            /// </summary>
            public string AccessorName { get; set; }
            /// <summary>
            /// 物料分类系统编号
            /// </summary>
            public int? CategoryId { get; set; }
            /// <summary>
            /// 物料分类名称
            /// </summary>
            public string CategoryName { get; set; }
            /// <summary>
            /// 收发货备注
            /// </summary>
            public string Memo { get; set; }
            /// <summary>
            /// 收发货明细备注
            /// </summary>
            public string DetailMemo { get; set; }
        }

        /// <summary>
        /// 带关联数据的收发货明细
        /// </summary>
        public class XShippingDetial
        {
            #region 收发货明细实体属性
            public int _id { get; set; }

            public System.Nullable<int> _shipping { get; set; }

            public string _shippingCode { get; set; }

            public System.Nullable<int> _order { get; set; }

            public string _orderCode { get; set; }

            public System.Nullable<int> _material { get; set; }

            public string _materialCode { get; set; }

            public System.Nullable<int> _shippingNum { get; set; }

            public string _batchNo { get; set; }

            public System.Nullable<decimal> _price { get; set; }

            public System.Nullable<decimal> _amount { get; set; }

            public System.Nullable<decimal> _taxPrice { get; set; }

            public System.Nullable<decimal> _taxAmount { get; set; }

            public System.Nullable<int> _depot { get; set; }

            public System.Nullable<int> _qcDetail { get; set; }

            public string _memo { get; set; }

            public bool _deleteFlag { get; set; }
            #endregion

            /// <summary>
            /// 材料名称
            /// </summary>
            public string MaterialName { get; set; }
            /// <summary>
            /// 材料规格
            /// </summary>
            public string Specs { get; set; }
            /// <summary>
            /// 材料有效日期
            /// </summary>
            public DateTime? Expire { get; set; }
            /// <summary>
            /// 收发货仓库代号
            /// </summary>
            public string DepotCode { get; set; }
            /// <summary>
            /// 收发货仓库名称
            /// </summary>
            public string DepotName { get; set; }
        }

        /// <summary>
        /// 工序
        /// </summary>
        public class WorkstageTreeNode
        {
            /// <summary>
            /// 工序系统编号
            /// </summary>
            public int Id { get; set; }
            /// <summary>
            /// 工序代号
            /// </summary>
            public string Code { get; set; }
            /// <summary>
            /// 工序名称
            /// </summary>
            public string Name { get; set; }
            /// <summary>
            /// 上级工序
            /// </summary>
            public int ParentId { get; set; }
        }

        /// <summary>
        /// 带关联数据的请购单
        /// </summary>
        public class XRequisition
        {
            /// <summary>
            /// 请购单系统编码
            /// </summary>
            public int Id { get; set; }

            /// <summary>
            /// 请购单代号
            /// </summary>
            public string Code { get; set; }

            /// <summary>
            /// 请购日期
            /// </summary>
            public DateTime? ReqDate { get; set; }

            /// <summary>
            /// 请购物料系统编号
            /// </summary>
            public int? MaterialId { get; set; }

            /// <summary>
            /// 请购物料代号
            /// </summary>
            public string MaterialCode { get; set; }

            /// <summary>
            /// 请购物料名称
            /// </summary>
            public string MaterialName { get; set; }

            /// <summary>
            /// 请购物料规格
            /// </summary>
            public string Specs { get; set; }

            /// <summary>
            /// 物料分类系统编号
            /// </summary>
            public int? CategoryId { get; set; }

            /// <summary>
            /// 物料分类名称
            /// </summary>
            public string CategoryName { get; set; }

            /// <summary>
            /// 请购物料数量
            /// </summary>
            public int? Num { get; set; }

            /// <summary>
            /// 制单人系统编号
            /// </summary>
            public int? OperatorId { get; set; }

            /// <summary>
            /// 制单人呢名称
            /// </summary>
            public string OperatorName { get; set; }

            /// <summary>
            /// 请购部门系统编号
            /// </summary>
            public int? DepartmentId { get; set; }

            /// <summary>
            /// 请购部门名称
            /// </summary>
            public string DepartmentName { get; set; }

            /// <summary>
            /// 请购人系统编号
            /// </summary>
            public int? BusinessmanId { get; set; }

            /// <summary>
            /// 请购人名称
            /// </summary>
            public string BusinessmanName { get; set; }

            /// <summary>
            /// 批准人系统编号
            /// </summary>
            public int? AccessorId { get; set; }

            /// <summary>
            /// 批准人名称
            /// </summary>
            public string AccessorName { get; set; }

            /// <summary>
            /// 请购明细备注
            /// </summary>
            public string DetailMemo { get; set; }

            /// <summary>
            /// 作废批注
            /// </summary>
            public string CancelComment { get; set; }

            /// <summary>
            /// 审批批注
            /// </summary>
            public string Comment { get; set; }

            /// <summary>
            /// 退回批注
            /// </summary>
            public string BackComment { get; set; }
        }

        /// <summary>
        /// 带关联数据的产品工程
        /// </summary>
        public class XPrdtPrjt
        {
            /// <summary>
            /// 产品工程系统编号
            /// </summary>
            public int Id { get; set; }

            /// <summary>
            /// 产品工程代号
            /// </summary>
            public string Code { get; set; }

            /// <summary>
            /// 物料Id
            /// </summary>
            public int MaterialId { get; set; }

            /// <summary>
            /// 物料代号
            /// </summary>
            public string MaterialCode { get; set; }

            /// <summary>
            /// 物料名称
            /// </summary>
            public string MaterialName { get; set; }

            /// <summary>
            /// 物料规格
            /// </summary>
            public string Specs { get; set; }

            /// <summary>
            /// 产品工程版本号
            /// </summary>
            public string Version { get; set; }

            /// <summary>
            /// 是否标准版本
            /// </summary>
            public bool IsStandard { get; set; }

            /// <summary>
            /// 工程师Id
            /// </summary>
            public int EngineerId { get; set; }

            /// <summary>
            /// 工程师名称
            /// </summary>
            public string EngineerName { get; set; }

            /// <summary>
            /// 是否提交
            /// </summary>
            public bool IsSubmit { get; set; }

            /// <summary>
            /// 提交人Id
            /// </summary>
            public int? SubmitManId { get; set; }

            /// <summary>
            /// 提交人名称
            /// </summary>
            public string SubmitManName { get; set; }

            /// <summary>
            /// 提交状态
            /// </summary>
            public string SubmitStatus { get; set; }

            /// <summary>
            /// 审批状态
            /// </summary>
            public string VerifyStatus { get; set; }

            /// <summary>
            /// 批准人Id
            /// </summary>
            public int? AccessorId { get; set; }

            /// <summary>
            /// 批准人名称
            /// </summary>
            public string AccessorName { get; set; }

            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime? CreateTime { get; set; }

            /// <summary>
            /// 更新时间
            /// </summary>
            public DateTime? UpdateTime { get; set; }

            /// <summary>
            /// 部门Id
            /// </summary>
            public int? DepartmentId { get; set; }

            /// <summary>
            /// 部门名称
            /// </summary>
            public string DepartmentName { get; set; }

            /// <summary>
            /// 图档Id
            /// </summary>
            public int? PicId { get; set; }

            /// <summary>
            /// 图号
            /// </summary>
            public string PicCode { get; set; }
        }

        /// <summary>
        /// 产品工程树节点
        /// </summary>
        public class PrdtPrjtNode
        {
            /// <summary>
            /// 产品工程系统编号
            /// </summary>
            public int Id { get; set; }

            /// <summary>
            /// 产品工程代号
            /// </summary>
            public string Code { get; set; }

            /// <summary>
            /// 产品工程版本号
            /// </summary>
            public string Version { get; set; }

            /// <summary>
            /// 是否标准版本
            /// </summary>
            public bool IsStandard { get; set; }

            /// <summary>
            /// 物料系统编号
            /// </summary>
            public int? MaterialId { get; set; }
            /// <summary>
            /// 物料代号
            /// </summary>
            public string MaterialCode { get; set; }
            /// <summary>
            /// 物料名称
            /// </summary>
            public string MaterialName { get; set; }
            /// <summary>
            /// 物料规格
            /// </summary>
            public string Specs { get; set; }
            /// <summary>
            /// 物料分类系统编号
            /// </summary>
            public int? CategoryId { get; set; }
        }

        /// <summary>
        /// 带关联数据的用户
        /// </summary>
        public class XUser
        {
            #region 用户数据类基本属性
            public int _id{ get; set; }

            public string _code{ get; set; }

            public string _name{ get; set; }

            public string _sex{ get; set; }

            public System.Nullable<int> _department{ get; set; }

            public bool _isActive{ get; set; }

            public string _nation{ get; set; }

            public string _position{ get; set; }

            public string _title{ get; set; }

            public System.Nullable<int> _wageGrade{ get; set; }

            public System.Nullable<decimal> _baseWage{ get; set; }

            public System.Nullable<decimal> _postWage{ get; set; }

            public string _memo{ get; set; }

            public bool _deleteFlag{ get; set; }
            #endregion

            #region 其他属性

            /// <summary>
            /// 所属部门代号
            /// </summary>
            public string DepartmentCode { get; set; }
            /// <summary>
            /// 部门名称
            /// </summary>
            public string DepartmentName { get; set; }
            #endregion
        }
    }
}
